﻿#region Using directives

using System;
using System.Collections.Generic;
using System.Text;

using Microsoft.VisualStudio.TestTools.UnitTesting;
using Weazel.NativeMath;

#endregion

namespace Weazel.NativeMath.Test
{
	[TestClass]
	public class TestUnsignedComparsion
	{
		/**************************************************************************
		 * Equals method
		 **************************************************************************/
		[TestMethod]
		public void TestEqualsMethod_1()
		{
			Assert.IsTrue(new Integer(8, 0, false).Equals(new Integer(8, 0, false)));
			Assert.IsFalse(new Integer(8, 0, false).Equals(new Integer(8, 1, false)));
		}

		/**************************************************************************
		 * Equals operator (==)
		 **************************************************************************/
		[TestMethod]
		public void TestEquals_1()
		{
			Assert.IsTrue(new Integer(8, 0, false) == new Integer(8, 0, false));
		}
		[TestMethod]
		public void TestEquals_2()
		{
			Assert.IsTrue(new Integer(8, 10, false) == new Integer(8, 10, false));
		}
		[TestMethod]
		public void TestEquals_3()
		{
			Assert.IsTrue(new Integer(8, 0, false) == new Integer(100, 0, false));
		}
		[TestMethod]
		public void TestEquals_4()
		{
			Assert.IsTrue(new Integer(8, 10, false) == new Integer(100, 10, false));
		}

		/**************************************************************************
		 * Not equals operator (!=)
		 **************************************************************************/
		[TestMethod]
		public void TestNotEquals_1()
		{
			Assert.IsFalse(new Integer(8, 0, false) != new Integer(8, 0, false));
		}
		[TestMethod]
		public void TestNotEquals_2()
		{
			Assert.IsFalse(new Integer(8, 10, false) != new Integer(8, 10, false));
		}
		[TestMethod]
		public void TestNotEquals_3()
		{
			Assert.IsFalse(new Integer(8, 0, false) != new Integer(100, 0, false));
		}
		[TestMethod]
		public void TestNotEquals_4()
		{
			Assert.IsFalse(new Integer(8, 10, false) != new Integer(100, 10, false));
		}

		/**************************************************************************
		 * Greater than operator (>)
		 **************************************************************************/
		[TestMethod]
		public void TestGreaterThan_1()
		{
			Assert.IsTrue(new Integer(8, 1, false) > new Integer(8, 0, false));
		}

		[TestMethod]
		public void TestGreaterThan_2()
		{
			Assert.IsTrue(new Integer(8, 100, false) > new Integer(8, 10, false));
		}

		[TestMethod]
		public void TestGreaterThan_3()
		{
			Assert.IsTrue(new Integer(8, 1, false) > new Integer(100, 0, false));
		}

		[TestMethod]
		public void TestGreaterThan_4()
		{
			Assert.IsTrue(new Integer(100, 1, false) > new Integer(8, 0, false));
		}

		/**************************************************************************
		 * Greater than or equal operator (>)
		 **************************************************************************/
		[TestMethod]
		public void TestGreaterThanOrEqual_1()
		{
			Assert.IsTrue(new Integer(8, 1, false) >= new Integer(8, 0, false));
		}

		[TestMethod]
		public void TestGreaterThanOrEqual_2()
		{
			Assert.IsFalse(new Integer(8, 0, false) >= new Integer(8, 1, false));
		}

		/**************************************************************************
		 * Less than or equal operator (>)
		 **************************************************************************/
		[TestMethod]
		public void TestLessThanOrEqual_1()
		{
			Assert.IsFalse(new Integer(8, 1, false) <= new Integer(8, 0, false));
		}

		[TestMethod]
		public void TestLessThanOrEqual_2()
		{
			Assert.IsTrue(new Integer(8, 0, false) <= new Integer(8, 1, false));
		}
	}
}
